package cn.lcsjsxy.yxz.inheritance.practice1;

public class kids  extends Mankind{

    /*
    定义类Kids继承ManKind，并包括成员变量int yearsOld;
    方法printAge()打印yearsOld的值。
    */

    private int yearsOld;
    //
    public kids(){

    }
    public kids(int yearsOld) {
        this.yearsOld = yearsOld;
    }

    public void printAge(){
        System.out.println("t am " + yearsOld + " years old. ");
    }

    public int getYearsOld() {
        return yearsOld;
    }
    public void setYearsOld(int yearsOld) {
        this.yearsOld = yearsOld;
    }



}
